package edu.ccut.saturn.basecomponent.baseservicecomponent;

import java.io.FileInputStream;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IParameterContext;

public class GetInputStreamFromFile extends DefaultComponent {
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		super.execute(parameterContext);
		String path = (String)parameterContext.getParameterValue(0);
		debug("filePath====="+path, parameterContext);
		if(path!=null){
			FileInputStream fis = new FileInputStream(path);
			parameterContext.setParameter(1, fis);
		}
	}
}